﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using AutorizacionRESTServices.Dominio;

namespace AutorizacionRESTServices
{
    [ServiceContract]
    public interface ISeguros
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Seguros", ResponseFormat = WebMessageFormat.Json)]
        Seguro CrearSeguro(Seguro seguroACrear);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Seguros/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        Seguro ObtenerSeguro(string codigo);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Seguros", ResponseFormat = WebMessageFormat.Json)]
        Seguro ModificarSeguro(Seguro seguroAModificar);

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "Seguros", ResponseFormat = WebMessageFormat.Json)]
        void EliminarSeguro(string codigo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Seguros", ResponseFormat = WebMessageFormat.Json)]
        List<Seguro> ListarSeguros();
    }
}
